import React, { Component, Fragment, Children } from 'react'

// import List from './List'
import FilteredList from './FiliteredList'

class App extends Component {

  state = {
    list: [
      {
        id: '001',
        text: 'aab'
      },
      {
        id: '002',
        text: 'bba'
      },
      {
        id: '003',
        text: 'ccc'
      },
      {
        id: '004',
        text: 'ddd'
      }
    ]
  }

  render() {
    return (
      <div>
        <FilteredList list={this.state.list}></FilteredList>
        <button onClick={() => this.forceUpdate()}>forceUpdate</button>
        <div>
          {
            Children.map(this.props.children, (abc) => {
              return <b>{abc}</b>
            })
          }
        </div>
      </div>
    );
  }
}

export default App;